# include <bits/stdc++.h>
# define MAXN 1003
using namespace std;
inline int gn() {
	int k = 0, f = 1;
	char c = getchar();
	for(; !isdigit(c); c = getchar()) if(c == '-') f = -1;
	for(; isdigit(c); c = getchar()) k = k * 10 + c - '0';
	return k * f;
}

inline char *gc() {
	char c[MAXN] = getchar();
	int i = 0;
	for(; !isdigit(c[i]); c[i] = getchar());
	for(; isdigit(c[i]); c[++i] = getchar());
	c[++i] = '\0';
	return c;
}

int main() {
	int n = 0;
	int chao = 0;
	char fir[MAXN] = gc();
	char sec[MAXN] = gc();
	cout << fir << endl << sec;

}
